[Ruby on Rails] Generate 404 error
Posted
by siulamvictor
on Stack Overflow
See other posts from Stack Overflow
or by siulamvictor
Published on 2010-04-26T10:13:39Z
Indexed on
2010/04/26
10:43 UTC
Read the original article
Hit count: 284
ruby-on-rails
|404
I create a action called "error404" in controller "pages", I would like to display this action if the following situation occurred:
- the controller in URL is not existed
- the action in URL is not existed
what should I do?
I tried to follow the instruction in this page, http://stackoverflow.com/questions/2553365/show-a-404-instead-of-500-in-rails , but seems only work with first situation.
Thanks for help. :)
© Stack Overflow or respective owner